main() {
  //运算符
  //1.算数运算符
  //+ - * / %

  print(1 + 2);
  print(1 - 2);
  print(1 * 2);
  print(1 / 2);
  print(1 % 2);
  print(1 ~/ 2);

  //2.赋值运算符
  var a = 10;
  a += 2;
  print(a);
  a -= 2;
  print(a);
  a *= 2;
  print(a);
  a %= 2;
  print(a);
  a ~/= 2;
  print(a);
  print(0.1 + 0.2); //0.30000000000000004
  num price = 19.99111111;
  print(price.toStringAsFixed(2)); //保留两位小数

  // 自增
  var b = 10;
  b++;
  print(b);
  // 自减
  b--;
  print(b);

  //3.关系运算符
  print(1 == 1);
  print(1 != 1);
  print(1 > 1);
  print(1 < 1);
  print(1 >= 1);
  print(1 <= 1);

  //4.逻辑运算符
  print(true && true);
  print(true || true);
  print(!true);
  print(true && false);
  print(true || false);
  print(!false);

  //5.条件运算符
  var a1 = 10;
  var b1 = 20;
  var c = a1 > b1 ? a1 : b1;
  print(c);

  //6.三元运算符
  print(1 > 2 ? "大于" : "小于");
//7.位运算符
  print(1 << 2);
  print(1 >> 2);
  print(1 & 2);
  print(1 | 2);
  print(1 ^ 2);
print(~1);




}
